package cn.getech.data.development.service.impl;

import cn.getech.data.development.dto.EsDto;
import cn.getech.data.development.service.EsService;
import cn.getech.data.development.utils.EsUtil;
import cn.getech.data.intelligence.common.exception.RRException;
import cn.getech.data.intelligence.common.utils.BaseRes;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName EsServiceImpl
 * @Description TODO
 * @Author Getech
 * @Date 2021/1/12 15:01
 */
@Service
public class EsServiceImpl  implements EsService {


    /**
    * @Description 获取索引列表
    * @Author  chengweiping
    * @Date   2021/1/12 15:06
    */
    @Override
    public List<String> getIndexList(EsDto esDto) throws Exception {
//        List<String> indexList=new ArrayList<>();
//        RestHighLevelClient client= EsUtil.getHighClient(esDto);
//        if(client==null){
//            throw new RRException("连接不可用！");
//        }
//        try {
//            indexList=EsUtil.getIndexList(client);
//        } catch (Exception e) {
//            throw new RRException("获取索引失败:"+e.getMessage());
//        }
//        return indexList;
        return null;
    }
}
